?<?php
function add($a, $b){
  return $a + $b;
}
function get($name){
  return isset($_GET[$name]) ? $_GET[$name]:'';
  }
  function post($name){
    return isset($_POST[$name]) ? $_POST[$name]:'';
    }
    $a = post('a');
      $a = post('b');
      $result = add($a,$b);
 ?>
<form action=" "method="post">
  <input type="text" value="<?php echo $a ; ?>" name="a"/>+<input type="text" name="b" value="<?php echo $b ; ?>"/>=246<br/>
  <input type="submit"/>
</form>
